package com.cc.blog.admin.convert;

import com.cc.blog.admin.domain.dto.UpdateBlogSettingsReqDTO;
import com.cc.blog.admin.domain.vo.FindBlogSettingsRspVO;
import com.cc.blog.admin.model.BlogSettingsDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 博客设置转换类
 * @Author cc
 * @Date 2024/7/11 10:24
 */
@Mapper
public interface BlogSettingsConvert {

    /**
     * 初始化 convert 实例
     */
    BlogSettingsConvert INSTANCE = Mappers.getMapper(BlogSettingsConvert.class);

    /**
     * 将 DTO 转化为 DO
     * @param bean
     * @return
     */
    BlogSettingsDO convertDTO2DO(UpdateBlogSettingsReqDTO bean);

    /**
     * 将 DO 转化为 VO
     * @param bean
     * @return
     */
    FindBlogSettingsRspVO convertDO2VO(BlogSettingsDO bean);
}
